<template>
  <div class="app-container">
    <div class="header">
      <div class="bread">
        <p>合同管理</p>
      </div>
      <div class="ipt">
        <div>
          <el-input
            v-model="input"
            placeholder="请输入客户/合同名称"
            size="normal"
            clearable
          ></el-input>
        </div>
        <div>
          <el-button type="primary" size="default" @click="search">
            搜索
          </el-button>
        </div>
      </div>
      <div class="btn">
        <el-button
          type="primary"
          size="default"
          @click="$router.push('/crm/expContract')"
          v-if="viewShow"
          >支出合同</el-button
        >
        <el-button type="primary" size="default" @click="newContract">
          新建合同
        </el-button>
        <el-dropdown>
          <el-button class="el-icon-more"></el-button>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item @click.native="getExl"> 导出 </el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
      </div>
    </div>
    <div class="chooise" v-if="selShow">
      <span>场景：</span>
      <el-select
        v-model="value"
        ref="sel"
        clearable
        @visible-change="(v) => visibleChange(v, 'sel', selClick, admClick)"
        class="sel-sence"
        @change="querySceneList"
      >
        <el-option
          v-for="item in options"
          :key="item.sceneId"
          :label="item.name"
          :value="item.sceneId"
        >
        </el-option>
      </el-select>
      <el-button
        type="primary"
        icon="iconfont icon-shaixuan"
        size="default"
        @click="screen"
      >
        高级筛选
      </el-button>
    </div>
    <div class="sel" v-else>
      <span> 已选中 {{ multipleSelection.length }} 项</span>
      <el-button
        type="primary"
        size="default"
        plain
        :disabled="chargeDisabled"
        @click="changeCharge"
      >
        更换负责人
      </el-button>
      <el-button
        type="primary"
        size="default"
        plain
        @click="editContract"
        :disabled="disabled"
      >
        编辑
      </el-button>
      <el-button
        type="primary"
        plain
        size="default"
        @click="addTeam"
      >
        添加团队成员
      </el-button>
      <el-button
        type="danger"
        size="default"
        plain
        @click="del"
        :disabled="delDisabled"
      >
        删除
      </el-button>
    </div>
    <div v-if="scenArr !== []" class="scenF">
      <div v-for="(item, index) in scenArr" :key="index" class="scenF-content">
        <div class="scenF-detail" @click="scenSearch(item.sceneId)">
          {{ item.sceneList }}
          <i
            class="el-icon-circle-close"
            @click.stop="scenDel(index)"
            style="margin-left: 10px"
          ></i>
        </div>
      </div>
    </div>
    <div class="table">
      <el-table
        :data="tableData"
        @selection-change="handleSelectionChange"
        :height="tableHight"
      >
        <template slot="empty" class="emptyBg">
          <img src="@/assets/images/empty.jpg" alt="" />
        </template>
        <el-table-column type="selection"></el-table-column>
        <template v-for="(item, index) in switchShow">
          <el-table-column
            :key="index"
            :label="item.label"
            v-if="showH(item, index)"
            :prop="item.stage"
            :width="item.width"
            :show-overflow-tooltip="true"
            fixed
          >
            <template slot-scope="scope">
              <span class="drawer" @click="drawer(scope.row)">
                {{ scope.row.name }}
              </span>
            </template>
          </el-table-column>
          <el-table-column
            :key="index"
            :label="item.label"
            v-if="item.label == '审核状态'"
            :prop="item.stage"
            :width="item.width"
            :show-overflow-tooltip="true"
          >
            <template slot-scope="scope">
              <span style="color: #00d41c" v-if="scope.row.status == 3">
                {{ scope.row.status | status }}
              </span>
              <span style="color: #e90202" v-else-if="scope.row.status == 4">
                {{ scope.row.status | status }}
              </span>
              <span style="color: #f7b500" v-else-if="scope.row.status == 5">
                {{ scope.row.status | status }}
              </span>
              <span style="color: #999999" v-else-if="scope.row.status == 6">
                {{ scope.row.status | status }}
              </span>
              <span style="color: #2b2b2b" v-else>
                {{ scope.row.status | status }}
              </span>
            </template>
          </el-table-column>
          <el-table-column
            :key="index"
            :label="item.label"
            v-if="item.label == '合同类型'"
            :prop="item.stage"
            :width="item.width"
            :show-overflow-tooltip="true"
          >
            <template slot-scope="scope">
              <span>
                {{ scope.row.type | type }}
              </span>
            </template>
          </el-table-column>
          <el-table-column
            :key="index"
            :label="item.label"
            :width="item.width"
            :prop="item.stage"
            v-show="item.value"
            v-if="
              item.label !== '合同名称' &&
              item.label !== '审核状态' &&
              item.label !== '合同类型' &&
              item.value
            "
            :show-overflow-tooltip="true"
          >
          </el-table-column>
        </template>
        <el-table-column fixed="right">
          <template slot="header">
            <i class="iconfont icon-shujupeizhi" @click.stop="tableShow"></i>
          </template>
        </el-table-column>
      </el-table>
      <div class="wuhu">
        <table-sh
          :dialog="dialog"
          :switchShow.sync="switchShow"
          v-if="dialog.dialogTableVisible"
          @submit="getSwitchList"
        ></table-sh>
      </div>
    </div>
    <div class="footer">
      <div class="footer-price">
        <span>合同总金额(元)：&nbsp;{{ contractPrice.amount }}</span>
        <span style="margin: 0 10px">
          已回款金额(元)：&nbsp;{{ contractPrice.returned }}
        </span>
        <span>未回款金额(元)：&nbsp;{{ contractPrice.unreturn }}</span>
      </div>
      <el-pagination
        prev-text="上一页"
        next-text="下一页"
        background
        :page-size="pageSize"
        :page-sizes="[10, 20, 30, 40, 50, 100]"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="pageNum"
        layout=" ->,total,sizes, prev, pager, next, jumper "
        :total="total"
      >
      </el-pagination>
    </div>

    <new-contact
      :dialog="dialog"
      ref="contact"
      v-if="dialog.newContactShowEject"
    ></new-contact>
    <drawer
      :dialog="dialog"
      :drawerData="drawerData"
      v-if="dialog.dialogDrawerEject"
    ></drawer>
    <drag-table
      :dialog="dialog"
      :type="type"
      v-if="dialog.senceAdminEject"
      ref="dragTable"
    ></drag-table>
    <manage-screen
      :dialog="dialog"
      v-if="dialog.screenEcejt"
      :type="type"
      @sceneArr="sceneArr"
    ></manage-screen>
    <!-- 更换负责人 -->
    <el-dialog
      title="更换负责人"
      :visible.sync="dialog.dialogPerCha"
      width="50%"
      @close="perClose"
      custom-class="dialogClass"
      :close-on-click-modal="false"
    >
      <charge-person
        v-if="dialog.dialogPerChaEject"
        ref="chaPer"
      ></charge-person>
      <span slot="footer">
        <el-button @click="dialog.dialogPerCha = false"> 取消 </el-button>
        <el-button type="primary" @click="onChangeChar"> 确定 </el-button>
      </span>
    </el-dialog>
    <join-team
      :dialog="dialog"
      v-if="dialog.joinTeamShowEject"
      :drawerData="drawerData"
      :type="type"
      :entities='entities'
    ></join-team>
    <transfer
      :dialog="dialog"
      :drawerData="drawerData"
      :type="type"
      v-if="dialog.transferShowEject"
    ></transfer>
  </div>
</template>

<script>
import {
  contactList,
  del,
  auditProcess,
  exportExl,
  changeDirector,
  contractFooter,
} from "@/api/CRM/comtact";
import { queryScene } from "@/api/currency";
import drawer from "../../contract/components/drawer.vue";
import newContact from "../../contract/components/newContact.vue";
import tableSh from "@/components/tableSh/index.vue";
import DragTable from "../../contract/components/dragTable.vue";
import ManageScreen from "../../contract/components/manageScreen.vue";
import { distriBution } from "@/api/registration";
// 负责人
import chargePerson from "@/components/chargePerson";
import joinTeam from "@/components/joinTeam/index.vue";
import Transfer from "@/components/joinTeam/transfer.vue";
import { rw, isDelete } from "@/api/team";
export default {
  name: "contract",
  props: {
    viewShow: {
      type: Boolean,
      default: true,
    },
  },
  components: {
    newContact,
    drawer,
    tableSh,
    DragTable,
    ManageScreen,
    chargePerson,
    joinTeam,
    Transfer,
  },
  filters: {
    status: function (val) {
      if (val == 1) {
        val = "正常";
      } else if (val == 2) {
        val = "撤回";
      } else if (val == 3) {
        val = "通过";
      } else if (val == 4) {
        val = "拒绝";
      } else if (val == 5) {
        val = "审核中";
      } else if (val == 6) {
        val = "已作废";
      } else if (val == 0) {
        val = "未提交";
      }
      return val;
    },
    type: function (val) {
      if (val == 1) {
        val = "新合同";
      } else if (val == 2) {
        val = "续约合同";
      }
      return val;
    },
  },
  data() {
    return {
       entities:[],
      tableHight: window.innerHeight - 330,
      contractPrice: {},
      type: 60,
      dialogImport: false,
      chargerOptions: [],
      charge: "",
      chargeId: "",
      selShow: true,
      disabled: false,
      delDisabled: false,
      chargeDisabled: false,
      multipleSelection: [],
      drawerData: {},
      options: [],
      tableData: [],
      scenArr: [],
      input: "",
      value: "",
      pageSize: 10,
      total: 0,
      pageNum: 1,
      dialog: {
        customerShowEject: false,
        customerShow: false,
        contractShowEject: false,
        contractShow: false,
        customerContractShowEject: false,
        customerContractShow: false,
        newPlanShow: false,
        newPlanShowEject: false,
        XshkDialog: false,
        XshkDialogEject: false,
        examineShow: false,
        customerContractShow: false,
        customerContractShowEject: false,
        OpportunityShow: false,
        OpportunityEject: false,
        customerShow: false,
        screenEcejt: false,
        activity: true,
        newContactShow: false,
        newContactShowEject: false,
        dialogDrawer: false,
        dialogDrawerEject: false,
        dialogTableVisible: false,
        dialogScreenVisible: false,
        dialogPerCha: false,
        dialogEnter: false,
        senceAdmin: false, //场景管理
        senceAdminEject: false,
        distributionShow: false,
        distributionShowEject: false,
        joinTeamShowEject: false,
        joinTeamShow: false,
        editTeamShowEject: false,
        editTeamShow: false,
        transferShow: false,
        transferShowEject: false,
        expenditureShowEject: false,
        expenditureShow: false,
      },
      // 控制表单的显示与隐藏
      switchShow: [
        {
          value: true,
          label: "合同名称",
          stage: "name",
        },
        {
          value: true,
          label: "合同编号",
          stage: "code",
        },
        {
          value: true,
          label: "客户名称",
          stage: "customer",
        },
        {
          value: true,
          label: "商机名称",
          stage: "opportunity",
        },
        {
          value: true,
          label: "合同金额",
          stage: "amount",
        },
        {
          value: true,
          label: "签约时间",
          stage: "contractTime",
          width: "120",
        },
        {
          value: true,
          label: "合同开始时间",
          stage: "startTime",
          width: "120",
        },
        {
          value: true,
          label: "合同结束时间",
          stage: "finishTime",
          width: "120",
        },
        {
          value: true,
          label: "客户签约人",
          stage: "customerContract",
        },
        {
          value: true,
          label: "公司签约人",
          stage: "companyContract",
        },
        {
          value: true,
          label: "备注",
          stage: "remark",
        },
        {
          value: true,
          label: "合同类型",
          stage: "type",
        },
        {
          value: true,
          label: "审核状态",
          stage: "status",
        },
        {
          value: true,
          label: "支出合同",
          stage: "relateName",
        },
        {
          value: true,
          label: "已收款金额",
          stage: "returned",
        },
        {
          value: true,
          label: "未收款金额",
          stage: "unreturn",
        },
        {
          value: true,
          label: "负责人",
          stage: "directorName",
        },
        {
          value: true,
          label: "更新时间",
          stage: "updateTime",
          width: "120",
        },
        {
          value: true,
          label: "创建人",
          stage: "createBy",
        },
        {
          value: true,
          label: "创建时间",
          stage: "createTime",
          width: "120",
        },
      ],
    };
  },
  mounted() {
    document.addEventListener("click", this.bodyCloseMenus);
    window.onresize = () => {
      return (() => {
        this.tableHight = window.innerHeight - 330;
      })();
    };
  },
  activated() {
    this.tableHight = window.innerHeight - 330;
  },
  beforeDestroy() {
    document.removeEventListener("click", this.bodyCloseMenus);
  },
  created() {
    this.getList();
    this.geConPrice();
    this.getScene();
  },
  methods: {
    // 获取高级筛选
    getScene() {
      queryScene({ type: 60 }).then((res) => {
        if (res.default !== null) {
          res.scenes.unshift(res.default);
          this.options = res.scenes;
        } else {
          this.options = res.scenes;
        }
      });
    },
    // 新增团队
    addTeam() {
      this.dialog.joinTeamShowEject = true;
      this.$nextTick(() => {
        this.dialog.joinTeamShow = true;
      });
    },
    // 获取合同价格
    geConPrice() {
      contractFooter().then((res) => {
        this.contractPrice = res;
      });
    },
    /** 导出按钮操作 */
    getExl() {
      this.$confirm("是否确认导出所有数据项?", "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(function () {
          return exportExl();
        })
        .then((response) => {
          console.log(response);
          this.download(response.msg);
        });
    },
    // 关闭更换负责人
    perClose() {
      this.charge = "";
      this.dialog.dialogPerChaEject = false;
    },
    // 确定更换
    onChangeChar() {
      if (this.charge == "") return this.$message.error("请选择负责人");
      changeDirector({
        id: this.drawerData.id,
        userId: this.charge,
      }).then((res) => {
        this.$message.success(res.msg);
        this.dialog.dialogPerCha = false;
        this.getList();
      });
    },
    //获取负责人
    getChargeList() {
      distriBution().then((res) => {
        this.chargerOptions = res.data;
      });
    },
    // 更换负责人
    changeCharge() {
      this.dialog.transferShowEject = true;
      this.$nextTick(function () {
        this.dialog.transferShow = true;
      });
    },
    // 编辑合同
    editContract() {
      rw({
        module: this.type,
        entity: this.drawerData.id,
        userId: this.drawerData.userId,
      }).then((res) => {
        if (res.data == true) {
          this.dialog.newContactShowEject = true;
          this.drawerData.auditUserIds = [];
          this.$nextTick(function () {
            this.$refs["contact"].contactForm = this.drawerData;
            auditProcess({
              id: this.drawerData.id,
            }).then((res) => {
              this.$refs["contact"].examineList = res.data;
              res.data.forEach((item) => {
                this.$refs["contact"].contactForm.auditUserIds = [];
                this.$refs["contact"].contactForm.auditUserIds.push(
                  item.userId
                );
              });
            });
            this.dialog.newContactShow = true;
          });
        } else {
          this.$message.info("无编辑权限");
        }
      });
    },
    //   新建合同
    newContract() {
      this.dialog.newContactShowEject = true;
      this.$nextTick(function () {
        this.dialog.newContactShow = true;
      });
    },
    // 点击临时搜索
    scenSearch(id) {
      this.getList(id);
    },
    // 删除临时搜索
    scenDel(i) {
      this.scenArr.splice(i, 1);
      if (this.scenArr.length == 0) {
        this.getList();
      }
    },
    // 获取数组
    sceneArr(data) {
      this.scenArr.push(data);
    },
    querySceneList() {
      this.getList(this.value);
    },
    //管理
    admClick() {
      this.dialog.senceAdminEject = true;
      this.$nextTick(function () {
        this.dialog.senceAdmin = true;
      });
    },
    //新建场景
    selClick() {
      this.screen();
    },
    // 场景下拉框按钮
    visibleChange(visible, refName, onClick, onClick2) {
      if (visible) {
        const ref = this.$refs[refName];
        let popper = ref.$refs.popper;
        if (popper.$el) popper = popper.$el;
        if (
          !Array.from(popper.children).some(
            (v) => v.className === "el-cascader-menu__list"
          )
        ) {
          const el = document.createElement("ul");
          el.className = "el-cascader-menu__list";
          el.style =
            "border-top: solid 1px #E4E7ED; padding:0; color: #606266;";
          el.innerHTML = `<li class="el-cascader-node" >
                            <span class="el-cascader-node__label" style='color:#1267FA'>新建场景</span>
                            </li>
                        `;
          const el2 = document.createElement("ul");
          el2.className = "el-cascader-menu__list";
          el2.innerHTML = `<li class="el-cascader-node" >
                            <span class="el-cascader-node__label" style='color:#1267FA'>管理</span>
                            </li>
                        `;
          popper.appendChild(el);
          popper.appendChild(el2);
          el2.onclick = () => {
            onClick2 && onClick2();
            if (ref.toggleDropDownVisible) {
              ref.toggleDropDownVisible(false);
            } else {
              ref.visible = false;
            }
          };
          el.onclick = () => {
            // 底部按钮的点击事件 点击后想触发的逻辑也可以直接写在这
            onClick && onClick();
            // 以下代码实现点击后弹层隐藏 不需要可以删掉
            if (ref.toggleDropDownVisible) {
              ref.toggleDropDownVisible(false);
            } else {
              ref.visible = false;
            }
          };
        }
      }
    },
    // 点击空白
    bodyCloseMenus(e) {
      let self = this;
      if (self.dialog.dialogTableVisible == true) {
        self.dialog.dialogTableVisible = false;
      }
    },
    // 控制列表排序
    tableShow() {
      if (this.dialog.dialogTableVisible == false) {
        this.dialog.dialogTableVisible = true;
      } else {
        this.dialog.dialogTableVisible = false;
      }
    },
    getSwitchList(list) {
      this.$set(this, "switchShow", list);
    },
    handleSizeChange(val) {
      this.pageSize = val;
      this.pageNum = 1;
      this.getList();
    },
    //  分页器
    handleCurrentChange(val) {
      this.pageNum = val;
      this.getList();
    },
    // 打开高级筛选
    screen() {
      this.dialog.screenEcejt = true;
      this.$nextTick(function () {
        this.dialog.dialogScreenVisible = true;
      });
    },
    // 表格前多选
    handleSelectionChange(val) {
      this.selShow = false;
      this.multipleSelection = val;
      this.entities=[]
      if (val.length !== 0) {
        this.chargeId = val[0].id;
        this.drawerData = val[0];
        val.forEach(item=>{
          this.entities.push(item.id)
        })
        if (
          val.length > 1 ||
          val[0].status == 3 ||
          val[0].status == 5 ||
          val[0].status == 6
        ) {
          this.disabled = true;
        } else {
          this.disabled = false;
        }
        if (val.length > 1 || val[0].status == 6) {
          this.chargeDisabled = true;
        } else {
          this.chargeDisabled = false;
        }
        if (val.length > 1 || val[0].status == 3 || val[0].status == 5) {
          this.delDisabled = true;
        } else {
          this.delDisabled = false;
        }
      }
      if (val.length == 0) {
        this.selShow = true;
      }
    },
    // 判断是否drawer
    showH(item, index) {
      let bole = false;
      if (item.label === "合同名称") {
        bole = true;
      }
      if (!item.value) bole = false;
      return bole;
    },
    // 打开抽屉
    drawer(row) {
      this.dialog.dialogDrawerEject = true;
      this.drawerData = row;
      // getDetail(row.id).then((res) => {});
      this.$nextTick(function () {
        this.dialog.dialogDrawer = true;
      });
    },
    // 删除高级选项
    async del() {
      const confirmResult = await this.$confirm(
        "此操作将永久删除该合同, 是否继续?",
        "提示",
        {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }
      ).catch((err) => err);
      /*如果用户确认打印confirm,如果用户取消显示cancel*/
      if (confirmResult !== "confirm") {
        return this.$message.info("已取消删除!");
      } else {
        let userIds = [];
        this.multipleSelection.forEach((item) => {
          userIds.push(item.userId);
        });
        isDelete(userIds).then((res) => {
          if (res.data == true) {
            del({
              id: this.chargeId,
            }).then((res) => {
              this.getList();
              this.$message.success(res.msg);
            });
          } else {
            this.$message.error("请联系负责人进行删除！");
          }
        });
      }
      // console.log('确认了删除')
    },
    // 搜索
    search() {
      this.getList();
    },
    // 获取所有数据
    getList(val) {
      contactList({
        sceneId: val,
        identification: this.input,
        pageSize: this.pageSize,
        pageNum: this.pageNum,
      }).then((res) => {
        this.tableData = res.rows;
        this.total = res.total;
      });
    },
  },
};
</script>

<style lang="less" scoped>
.header {
  width: 100%;
  height: 74px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ececec;
  .bread {
    display: flex;
    align-items: center;
    margin-left: 5px;
    padding: 0 10px;
    height: 30px;
    display: flex;
    vertical-align: middle;
    height: 74px;
    border-bottom: 2px solid #1267fa;
    img {
      height: 100%;
    }
    i {
      font-size: 30px;
    }
    p {
      text-align: center;
      //   margin-left: 10px;
      font-size: 16px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      //   color: #2b2b2b;
    }
  }
  .ipt {
    display: flex;
  }
  .btn {
    .el-dropdown-selfdefine {
      margin: 0 20px;
    }
  }
}
.chooise {
  margin-top: 20px;
  .sel {
    margin: 0 14px;
  }
  .sel-sence {
    margin-right: 20px;
  }
  .el-button {
    font-size: 14px;
    /deep/ span {
      margin-left: 5px;
    }
  }
}
.sel {
  margin-top: 20px;
  span {
    margin-right: 40px;
  }
}
.drawer {
  color: #1267fa;
  cursor: pointer;
}
.el-pagination {
  margin-top: 24px;
  /deep/ .el-pagination__total {
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    margin-right: 25px;
  }
  /deep/ .btn-prev {
    width: 80px;
    height: 40px;
    text-align: center;
  }
  /deep/ .btn-next {
    width: 80px;
    height: 40px;
    text-align: center;
  }
  /deep/ .number {
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
  }
  /deep/ .el-input__inner {
    // width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
  }
  /deep/ .more {
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
  }
  /deep/ .el-pagination__jump {
    .el-input__inner {
      width: 40px;
      height: 40px;
    }
  }
}
.scenF {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  .scenF-content {
    display: flex;
    margin-left: 10px;
    margin-top: 10px;
    .scenF-detail {
      height: 36px;
      line-height: 36px;
      padding-left: 20px;
      padding-right: 20px;
      border: 1px solid #9aa1af;
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #666666;
      .el-icon-circle-close {
        transform: translateY(3px);
      }
    }
  }
}

.importInfo {
  /deep/.el-dialog__footer {
    text-align: left;
  }
  /deep/ .el-dialog__body {
    display: flex;
    justify-content: space-around;
    .module {
      width: 40%;
      height: 300px;
      .module-img {
        width: 49px;
        height: 60px;
        margin: 50%;
        transform: translate(-50%, -50%);
        img {
          width: 100%;
          height: 100%;
        }
        .el-button {
          margin-top: 10px;
          transform: translateX(-25%);
        }
      }

      .module-txt {
        transform: translateY(400%);
        text-align: center;
        font-size: 14px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #1f2e4d;
      }
    }
  }
  .dashed {
    width: 1px;
    height: 180px;
    border-left: 2px dashed rgba(0, 0, 0, 0.1);
    transform: translateY(35%);
  }
  /deep/.el-upload-list {
    display: none;
  }
}
.table {
  position: relative;
  .wuhu {
    position: absolute;
    top: 45px;
    right: 0px;
    z-index: 9999;
    background-color: #fff;
    border: 1px solid #ececec;
  }
}
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>